﻿@model BookClubPortal.Models.Book

@{
    ViewBag.Title = "Details";
}


<h2>Details</h2>

<fieldset class="details-listing">
    <legend>Book</legend>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Title)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Title)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Author)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Author)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.ReleaseYear)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.ReleaseYear)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Description)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Description)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.ImageURL)
    </div>
    <div class="display-field">        
        <a href="@Model.ImageURL" target="_blank"><img src="@Model.ImageURL" alt="@Model.Title" onerror="AltImage(this,'@Url.Content("~/Content/Images/logo.png")')" width="50" height="50"></a></text>
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.GenreId)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Genre.Name)
    </div>

    </fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id = Model.BookId }) |
    @Html.ActionLink("Back to List", "Index")
</p>


@section Scripts {
    @Scripts.Render("~/bundles/tools")
}
